#include "EngineRenderContext.h"
#include "ExtException.h"

#if defined _WIN32 || defined WIN32
	#include "DXRenderContext.h"
#endif 
	#include "OGLRenderContext.h"

IEngineRenderContextPtr CreateEngineRenderContext(RENDER_CONTEXT_TYPE type, const shared_ptr<IEngineWindow>& window)
{
	switch (type) {
#if defined _WIN32 || defined WIN32
		case RENDER_DX:
			return make_shared<DXRenderContext>(window);
		break;
#endif //WIN32
		case RENDER_OGL:
			return make_shared<OGLRenderContext>(window);
		break;
		default:
			EXT_EXCEPTION("Invalid render context type: %d", type);
	}
}